Reporting Facility

 

The Reporting Facility allows you to extract and retrieve information about ActiveBatch Job instances. The ActiveBatch Reporting Facility described in this section is for the simple creation and execution of ActiveBatch reports (particularly ad-hoc reporting).

 

Note: This Reporting Facility has been deprecated and will be removed in the next major release of ActiveBatch. ActiveBatch reporting has been significantly enhanced through both Template Reporting and ActiveBatch OLAP-based Instance Reporting, where the Instance Reporting includes built-in reports using Microsoft’s SQL Server Reporting Services, Crystal Reports and Oracle Answers. These offerings are significantly more powerful and do not impact the transactional ActiveBatch database. Moreover, advanced users can write their own reports using these facilities. We highly recommend that you migrate your reporting to the much more powerful and flexible Template Reporting (for definitions) and OLAP Reporting (for instances). These facilities are a part of the standard ActiveBatch license.

 

Reporting Overview

The ActiveBatch Reporting Facility allows you to generate customized reports concerning the scheduling and execution of ActiveBatch Jobs. You can access the Reporting Facility through the ActiveBatch Console Tools > Reporting Facility menu option.

 

 

When you click on the Reporting Facility selection you will see a dialog box similar to the image below.

   

 

This dialog box serves several purposes:

  1. A list of existing ActiveBatch Reporting (.ABR) files are displayed.

  2. You can create, edit, rename or delete ActiveBatch Reporting files.

  3. You can select a Job Scheduler machine and run a desired report.

 

The top-level drop down list displays one or more entered directories in which you store your ABR files. By default, ActiveBatch stores your files in your “My Documents” folder. You can browse and select other folders by either entering a valid specification or by clicking on the button.

Creating a Reporting File

An ActiveBatch Reporting file is not a report rather it is a template that can later be used to generate a report. To create a new Reporting file click on the New button.

 

 

Enter Report Filename. You are asked to enter a filename that will be used when creating the Reporting file. Do not enter an extension or a path specification. Just enter a filename such as SampleReport and then click the OK button.

 

The above dialog allows you to create your Report. You can specify search criteria, what columns (fields/properties) to display and their sorting order. Let’s divide the Report Filter dialog into several sections for easier discussion.

Column Selection

This part of the dialog allows you to select one or more Job properties (columns) that you would like to report on. You’ll notice that this section of the display contains three (3) headings: Property Name, Type, and Description. Property Name is self-explanatory. Each property is uniquely named. Each property typically corresponds to a database column found in one of the ActiveBatch database tables. Type indicates whether the property is historical (and therefore may or may not be present) or not. Description describes the property. You select columns for display by selecting a property and then clicking on the Add to Report button. This will cause the property to move down to the "Fields to display in report" control.

 

 

In the above image, several columns have been selected. The columns will display in the order they are listed. To change the ordering, select the desired column and use the UP and DOWN arrow buttons on the right side of the control.

 

To sort the report into any special sequence, simply select a property in the "Fields to display in report" and click the button. That will add the property to the sort list. To change the sorting order, use the UP and DOWN arrow buttons that are part of that control. Normally the sort order for a property is ascending. To change the order, select the property and click the Toggle Sort button. To remove a sorting property, select the property and click the Remove from sort button.

Search Column Criteria

Once you’ve selected your columns for display you can add search criteria using two (2) methods. The first is to select a property and then click the Edit Search Criteria… button.

 

 

The above image shows a sample search specification. You can select a comparison operator followed by the comparison value.

 

 

In the image above, search criteria has been added for the “Name” property (that is to display only Job names with “DailyBackup”).

The second approach is to enter SQL syntax into the Additional “Where” clause field. This is useful when you need to perform additional WHERE clause operations that wouldn’t otherwise be supported by the report generator.

 

 

The above example illustrates pattern matching for the Job Name. When specifying additional “Where” clauses please note that you must ensure that any property in the “Where” clause is also present in the “Columns to display in report”.

Date Specification

Report Date Specification

One of the most important search criteria is the date specification. By that we mean the date or range of dates that the report will encompass. You have three (3) selections to choose from. No Date Range essentially allows you to report on the entire database. Fixed Date allows you to select a range of specific dates and times. Relative Dates allows you to indicate self-relative dates based on when the report is submitted.

You can also select the state of the Instances, for example, Completed, Held, etc. The checkbox allows you to include Plans (by default, only Job instances are reported).

Custom SQL

 

For advanced SQL users you can enter a complete SELECT statement by clicking on the Custom SQL statement field.

Generating a Report

Once you’ve created a Report file you can generate a report. You have two (2) methods of generating a report within ActiveBatch. One is to use ActiveBatch Console interactively the other is to use the console app abatrptgen. The latter is particularly useful for generating reports within an ActiveBatch Job itself.

 

The ActiveBatch Reporting facility works best when ODBC/OLE-DB is installed and available. You should see excellent report generation performance when using this method. However, there may be some occasions when ODBC/OLE-DB or connection to the ActiveBatch database is not feasible. In this case, ActiveBatch will use its COM model for generating reports. When using the COM model, the following restrictions are present: No direct SQL use is allowed and the generation of the report will be significantly slower as compared to using the direct database access method.

 

The security credentials used when generating a report varies depending on the database authentication model in use. For Windows authentication, by default, your Windows logon credentials are used when generating an ODBC based report. If your logon credentials fail, ActiveBatch will prompt for new security credentials. For Database authentication, by default, the DB Username is specified and you must supply the password. If Database Authentication fails, you will be prompted to confirm the use of COM (RPC) for report generation. As stated previously, COM is significantly slower than ODBC access.

Interactive Report Generation

 

To generate a report, select the ActiveBatch Report file and a connected Job Scheduler system. Then click the Run/View Report button. To obtain a report using different reporting dates, click the Run/View Report (Advanced) button. An additional dialog appears with From and To date and times.

 

    

 

The above report was produced using the SanpleReport ABR file. The columns displayed and the overall report are self explanatory.  Note the last 2 items in the report footer. ODBC Connect String can be useful when you need to write your own reports using third party report writers or tools. Likewise SQL Statement shows you the exact SQL SELECT statement that was issued to produce the report.

Reports can be displayed for simple viewing or printed. You can also save generated reports (as HTML files) for later viewing. Users of the ActiveBatch Webserver product can also save these HTML files to a “reporting” location for later viewing by your end-users.

Non-Interactive Report Generation

In addition to the use of ActiveBatch Console you can also generate reports non-interactively through the console app AbatRptGen. AbatRptGen supports both the ODBC (preferred) and COM methods for generating reports.

 

ODBC Method:

 

       AbatRptGen -r ReportFile   -o OutputFile  -d OdbcConnectString   [ -t OutputType ]

 

ReportFile - ActiveBatch Report File (.ABR)

OutputFile - Report Output file that is generated

OdbcConnectString - ODBC Connect String (see Section 13.3.1 and the comment concerning ODBC Connection

String).

OutputType -  (Optional) Report Output Type (HTML, CSV, XML)

 

Note: -c ReportFile allows you to convert from an older report file version to the latest version. For example, to invoke the same report that we produced interactively (in the previous section) the command might be:     Abatrptgen  -r  “c:\program files\asci\activebatch\reports\SampleReport.abr”  -o SampleReport.html               -d  “Driver=SQL Server;Server=ENGSERVER1;Database=ASCIABAT”

 

This convenient command not only generates report files but can also generate a CSV file which can be used to import the report data into a variety of other third-party tools. AbatRptGen can also generate an XML file for simplified parsing and data formatting.

 

COM Method:

 

       AbatRptGen -r ReportFile   -o OutputFile  -j   JSSMachine  [  -u  UserName ] [ -p  Password ]  [ -t OutputType ]

 

ReportFile - ActiveBatch Report File (.ABR)

OutputFile - Report Output file that is generated

JSSMachine - Job Scheduler machine name (or IP address)

UserName - (Optional) Valid Windows Domain\User Account

Password - (Optional) Password for above account

OutputType - (Optional) Report Output Type (HTML, CSV, XML)

 

If User Security credentials are omitted then the current logon credentials are used.

 

The COM method has the following limits:

  • No Date Range can be specified.

  • No Custom SQL statement or WHERE clause can be specified.

  • Job Templates cannot be displayed in the report.

Third-Party Tools/Report Writers

With ActiveBatch’s use of ODBC-compliant databases you are free to use any tool or report writer (such as Business Intelligence’s Crystal Reports) to query the database.